package com.example.object_oriented.abstracts;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author readpage
 * @date 2023-01-05 15:49
 */
@Data
@NoArgsConstructor
public class Salary extends Employee {
    private double salary; // Annual salary

    public Salary(String name, String address, int number, double salary) {
        super(name, address, number);
        this.salary = salary;
    }

    public static void main(String[] args) {
        Salary s = new Salary("Mohd Mohtashim", "Ambehta, UP", 3, 3600.00);
        Employee e = new Salary("John Adams", "Boston, MA", 2, 2400.00);

        System.out.println("Call mailCheck using Salary reference --");
        s.mailCheck();


        System.out.println("\n Call mailCheck using Employee reference--");
        e.mailCheck();
    }

}
